//
//  CDDController.m
//  PrintJob
//
//  Created by blank on 2017/5/8.
//  Copyright (c) 2017 CYN. All rights reserved.
//

#import "CDDController.h"
#import "MyView.h"
#import "MyPresenter.h"
#import "CDDContext.h"

@interface CDDController ()

@property(nonatomic, retain) MyView         *myView;

@property(nonatomic, retain) MyPresenter    *myPresenter;


@end

@implementation CDDController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.context = [CDDContext context];
    NSLog(self.context);

}

- (MyView *)myView {
    if (!_myView) {
        _myView = [[MyView alloc] initWithFrame:self.view.bounds];
        [self.view addSubview:_myView];
    }
    return _myView;
}

- (MyPresenter *)myPresenter {
    if (!_myPresenter) {
        _myPresenter = [[MyPresenter alloc] init];
    }
    return _myPresenter;
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
